government middle ages